package com.spring.shops.dao;

import com.github.pagehelper.Page;
import com.spring.shops.model.dto.NoticeDTO;
import com.spring.shops.model.entity.TzNotice;
import org.apache.ibatis.annotations.Select;

public interface TzNoticeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TzNotice record);

    int insertSelective(TzNotice record);

    TzNotice selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TzNotice record);

    int updateByPrimaryKeyWithBLOBs(TzNotice record);

    int updateByPrimaryKey(TzNotice record);

    /**
     * 动态条件分页查询
     * @param noticeDTO
     * @return
     */
    Page<TzNotice> page(NoticeDTO noticeDTO);


    @Select("select * from tz_notice where id =#{id}")
    TzNotice selectById(Long id);
}